<?php use_helper('Pagination') ?>
<style>
  ul#notes li {
  	float: left;
  	margin-left: 40px;
  	margin-top: 20px;
  }
</style>
<?php slot('coursesNav', 'active') ?>
<div class="courses" id="wrapper">
	<?php include_partial('global/systemMessages') ?>
	<h2><br>
	<p>This list only includes notes that have not been tagged as "done". To re-associate a particular course_id, select edit for a note
	of that course_id. Then, search for an existing course using the search bar, and if a match is found, click the "RE-ASSOCIATE..." link
	to map all notes of that course_id to this newly selected course. If you find a course_id pointing to a course that does not exists in the 
	current database either:</p><br><br>
	<ul>
		<li> a) If it is a course that is no longer offered, unlisted, etc, manually create it and then search for it from the edit interface.</li>
		<br><li> b) If the desired course is from a catalog other than the main Harvard University Course Catalog, then leave the notes until 
		the database is updated</li>
	</ul>	
	<br>
	<br>	
	<strong>--Colin</strong>
</h2>	
	<div id="content">
		<div style="clear: both; text-align: center">
		<?php echo pager_navigation($notes_pager, 'fixnotes/index') ?>
		</div>
	
		<div style="width: 990px">
		<ul id="notes">
				<li style="clear: left; width: 20px;">id</li>
				<li style="width: 20px;">user_id</li>
				<li style="width: 20px;">course_id</li>
				<li style="width: 40px;">semester</li>
				<li style="width: 250px;">course name</li>
				<li style="width: 200px;">topic</li>
				<li style="width: 150px;">action</li>
		<?php foreach($notes_pager->getResults() as $k => $note): ?>
				<li style="clear: left; width: 20px;"><?php echo $note->getId() ?></li>
				<li style="width: 20px;"><?php echo $note->getUserId() ?></li>
				<li style="width: 20px;"><?php echo $note->getCourseId() ?></li>
				<li style="width: 40px;"><?php echo $note->getSemester() ? $note->getSemester() : ""  ?></li>
				<li style="width: 250px;"><?php //echo $note->getCourse()->getName() ?></li>
				<li style="width: 200px;"><?php echo $note->getTopic() ?></li>
				<li style="width: 150px;"><?php echo link_to('edit note', 'fixnotes/edit?note_id='.$note->getId()
					.'&notes_page='.$sf_request->getParameter('page', 1)
				) ?>
				<?php echo link_to('view', 'notes/show?id='.$note->getId()) ?>
				<a href="http://finalsclub.org/notes/show/id/<?php echo $note->getId() ?>">production</a>
				</li>
		<?php endforeach ?>
		</ul>
	
		</div>
		<div style="clear: both; text-align: center">
		<?php echo pager_navigation($notes_pager, 'fixnotes/index') ?>
		</div>
	</div>
</div>
